[Data]
life = 900
attack = 100
defence = 100
fall.defence_up = 50
liedown.time = 60
airjuggle = 25
sparkno = S6001
guard.sparkno = -1
KO.echo = 0
volume = 0
IntPersistIndex = 0
FloatPersistIndex = 0

[Size]
xscale = 1
yscale = 1
ground.back = 13
ground.front = 13
air.back = 11
air.front = 11
height = 28
attack.dist = 80
proj.attack.dist = 80
proj.doscale = 2
head.pos = 3, -54
mid.pos = 1, -30
shadowoffset = 0
draw.offset = 0,0

[Velocity]
walk.fwd  = 2.8
walk.back = -2.4
run.fwd  = 5.7,-2.8
run.back = -5,-2.8
jump.neu = 0,-7.64
jump.back = -2.7
jump.fwd = 2.9
runjump.back = -2.4,-3.1
runjump.fwd = 2.4,-3.1
airjump.neu = 0
airjump.back = 0
airjump.fwd = 0

[Movement]
airjump.num = 0
airjump.height = 0
yaccel = .44
stand.friction = .85
crouch.friction = .82

[Quotes]
victory1 = "Someone couldn't keep up with me..."
victory2 = "You can't beat a Shadow Warrior!"
victory3 = "That is the power of the Dragon Clan!"
victory4 = "You've only experienced a taste of what this sword offers..."
victory5 = "This is no different from my normal training."
victory6 = "I don't have the time for such silly games..."
victory7 = "Agh... stupid hawk..."
victory8 = "Who keeps making these bio-noids?!?"
victory9 = "You still have much more to learn, kid."
;---------------------------------------------------------------------------
;Var List

;***Universal***
;var(0) = Command variable
;var(1) = Famicom Fighters character detection
;var(2) = First hit counter
;var(3) = Helper select
;var(4) = Victory quote variable
;var(5) = Juggle Count
;var(6) = Helper health
;var(7) = Helper meter
;var(8) = Pause variable
;var(9) = Special move combo condition
;var(10) = Command Detection
;var(20) = Detection for first hit of multi-hit/multi-state moves
;var(21) = Test Var
;var(22) = Identification Variable
;var(23) = Counter for Training Mode Detection
;var(24) = Training Mode Var	  
;var(25) = Death State Check
;var(27) = Test Var
;var(28) = Super Finish
;var(30) = Hide helper bars and move names
;var(31) = Max helper health
;var(32) = Countdown for helper select
;var(33) = Back Charge
;var(34) = Back Charge Ready
;var(35) = Down Charge
;var(36) = Down Charge Ready
;var(37) = Projectile Ready
;var(38) = Helper Ready
;var(39) = Helper Projectile Ready
;var(40) = Air Guard Option
;var(41) = Air Recovery Option
;var(42) = Helpers Option
;var(43) = Pause Option 
;var(44) = Control Scheme
;var(45) = Standalone Helper Bar (X-Position)
;var(46) = Standalone Helper Bar (Y-Position)
;var(47) = Standalone Helper Bar (BG)
;var(48) = Alt Victory Music
;var(50) = Reaction var
;var(51) = Tag team var
;var(52) = Projectile animation var
;var(53) = Assist check
;var(54) = Hyper Tag-In check
;var(55) = AI switch check
;var(58) = Special move command time var
;var(59) = AI Var
;fvar(0) = Helper bars scaling
;fvar(20) = Damage scaling, current power
;fvar(21) = Damage scaling, future power
;fvar(24) = Test Var
;fvar(30) = Special projectile Vel X
;fvar(31) = Special projectile Vel Y
;fvar(32) = Super projectile Vel X
;fvar(33) = Super projectile Vel Y
;fvar(34) = Helper projectile Vel X
;fvar(35) = Helper projectile Vel Y
;fvar(36) = Helper Vel X
;fvar(37) = Helper Vel Y


;***Specific***
;var(11) = Projectile speed variable
;var(15) = Command variable for specials
;fvar(10) = Air X-acceleration during air moves
;fvar(11) = Air Y-acceleration during air moves

;***Helpers***
;(Almost?) Universal
;-fvar(1) = Pos X coordinates
;-fvar(2) = Pos Y coordinates
;(Fire Wheel)
;-var(1) = Life
;---------------------------------------------------------------------------
; Lose by Time Over
[Statedef 170]
type = S
ctrl = 0
anim = 170
velset = 0,0

[State 5601, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 5400, 2]
type = AssertSpecial
trigger1 = 1
flag = nokoslow
flag2 = nomusic
flag3 = noshadow 

[State 170, 3]
type = PlaySnd
triggerall = !NumPartner
trigger1 = !Time
value = S11,1

[State 170, 4]
type = PlaySnd
triggerall = NumPartner
trigger1 = (ID = 56 || ID = 58) && !Time
trigger2 = (ID = 57 || ID = 59) && partner,Alive = 0 && !Time
value = S11,1
;---------------------------------------------------------------------------
; Win state decider
[Statedef 180]
type = S

[State 180, 1]
type = ChangeState
trigger1 = !MatchOver && Time = 0
value = 181+8*(enemy,Name = "Bonus" && enemy,Var(0) = 0 && enemy,Var(5) = 0)

[State 180, 2]
type = ChangeState
trigger1 = NumPartner && MatchOver && !Time
value = 182

[State 180, 3]
type = ChangeState
triggerall = MatchOver && !Time
trigger1 = !NumPartner && enemy,Name = "Bonus" && enemy,Var(0) = 0 && enemy,Var(5) = 0
value = 189

[State 180, 3]
type = ChangeState
triggerall = MatchOver && !Time
trigger1 = !NumPartner && (enemy,Name != "Bonus" || enemy,Var(0) != 0 || enemy,Var(5) != 0)
value = 182+1*(Random <= 100)
;---------------------------------------------------------------------------
;Round Win
[Statedef 181]
type = S
ctrl = 0
anim = 180
velset = 0,0

[State 181, 1]
type = Null
trigger1 = AnimElem = 6
value = S0,1
;---------------------------------------------------------------------------
;Match Win
[Statedef 182]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 182, 1]
type = AssertSpecial
trigger1 = Time <= 125
flag = roundnotover

[State 182, 2]
type = PlaySnd
triggerall = !NumPartner
trigger1 = Time = 1
value = S180,Cond(PalNo = 2 || PalNo = 5,1,0+(2*(PalNo = 4)))

[State 182, 3]
type = PlaySnd
triggerall = NumPartner
trigger1 = (ID = 56 || ID = 58) && !Time
trigger2 = (ID = 57 || ID = 59) && partner,Alive = 0 && !Time
value = S180,Cond(PalNo = 2 || PalNo = 5,1,0+(2*(PalNo = 4)))

[State 182, 4]
type = PlaySnd
trigger1 = AnimElem = 3
value = S190,1

;---------------------------------------------------------------------------
;Match Win
[Statedef 183]
type = S
ctrl = 0
anim = 181
velset = 0,0

[State 183, 1]
type = AssertSpecial
trigger1 = 1
flag = roundnotover

[State 183, 2]
type = PlaySnd
trigger1 = !Time
value = S180,Cond(PalNo = 2 || PalNo = 5,1,0+(2*(PalNo = 4)))
channel = 6

[State 183, 3]
type = Helper
trigger1 = !Time
name = "YOU BIRDS I SWEAR"
ID = 180
stateno = 185
pos = -125,-30
postype = back
facing = 1
keyctrl = 0
ownpal = 1

[State 183, 4]
type = PlaySnd
trigger1 = AnimElem = 3
value = S190,1

[State 183, 5]
type = ChangeState
triggerall = NumHelper(180)
trigger1 = helper(180),StateNo = 186
value = 184

;---------------------------------------------------------------------------
;Match Win
[Statedef 184]
type = A
ctrl = 0
velset = 2,-4.5
anim = 5600

[State 184, 1]
type = AssertSpecial
trigger1 = Time <= 115
flag = roundnotover

[State 184, 2]
type = ScreenBound
trigger1 = 1
value = 0

[State 184, 3]
type = StopSnd
trigger1 = !Time
channel = 6

[State 184, 4]
type = Gravity
trigger1 = 1

[State 184, 5]
type = VictoryQuote
trigger1 = 1
value = 7

[State 184, 6]
type = Turn
trigger1 = !Time

[State 184, 7]
type = PlaySnd
trigger1 = !Time
value = S181,0
;---------------------------------------------------------------------------
;Match Win
[Statedef 185]
type = A
ctrl = 0
anim = 902
velset = 0,0

[State 185, 1]
type = VelAdd
trigger1 = 1
x = .25

[State 185, 2]
type = ScreenBound
trigger1 = 1
value = 0

[State 185, 3]
type = ChangeState
trigger1 = ParentDist X <= 15
value = 186
;---------------------------------------------------------------------------
;Match Win
[Statedef 186]
type = A
ctrl = 0
anim = 185

[State 186, 1]
type = VelAdd
trigger1 = 1
x = .25

[State 186, 2]
type = ScreenBound
trigger1 = 1
value = 0
;---------------------------------------------------------------------------
; Introduction
[Statedef 191]
type = S
ctrl = 0
anim = 190
sprpriority = 5

[State 191, 1]
type = AssertSpecial
trigger1 = Time < 109
flag = Intro

[State 191, 2]
type = ScreenBound
trigger1 = 1
value = 0

[State 191, 3]
type = Explod
trigger1 = !Time
anim = 900 
ID = 190
pos = 0,-55
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = 35
pausemovetime = 0
scale = 1,1
sprpriority = 0
ownpal = 1
removeongethit = 0

[State 191, 4]
type = EnvColor
trigger1 = Time = 34
value = 255,255,255
time = 1

[State 191, 5]
type = Explod
trigger1 = Time = 36
anim = 901 
ID = 190
pos = 0,-55
postype = p1  ;p2,front,back,left,right
facing = 1*Facing
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,.35
removetime = 15
pausemovetime = 0
scale = 1,1
sprpriority = 0
ownpal = 1

[State 191, 6]
type = PlaySnd
trigger1 = Time = 34
value = S190,0

[State 191, 7]
type = PlaySnd
trigger1 = Time = 35
value = S190,1

[State 191, 8]
type = PlaySnd
trigger1 = Time = 51
value = S190,2

[State 191, 9]
type = ChangeState
trigger1 = !AnimTime
value = 0 

;---------------------------------------------------------------------------
; Taunt
[Statedef 195]
type = S
movetype = I
physics = S
ctrl = 0
anim = 195
velset = 0,0
sprpriority = 2

[State 195, 1]
type = Helper
trigger1 = !Time
name = "Ninja"
ID = 195
stateno = 196
pos = 50,floor((ScreenPos Y - 100))
postype = p1
facing = 1
keyctrl = 0
ownpal = 1

[State 195, 2]
type = PlaySnd
trigger1 = AnimElem = 4
value = S190,0

[State 195, 2]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
; Taunt
[Statedef 196]
type = A
movetype = I
physics = N
anim = 196
velset = 0,-9.1
sprpriority = 2

[State 196, 1]
type = VelAdd
trigger1 = 1
y = .35

[State 196, 2]
type = PlaySnd
trigger1 = !Time
value = S40,0

[State 196, 3]
type = ChangeState
triggerall = parent,StateNo = 195 && ((ParentDist X >= -78*const(size.xscale)) && (ParentDist X <= -23*const(size.xscale)))
trigger1 = parent,AnimElemTime(4) = 2
value = 197
;---------------------------------------------------------------------------
; Taunt
[Statedef 197]
type = A
movetype = I
physics = N
anim = 197
velset = 0,0
sprpriority = 2

[State 197, 1]
type = Explod
trigger1 = Time = 3
anim = 198
ID = 197
pos = -21,-11
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = -4.5,-3.8
removetime = -2
scale = 1,1
sprpriority = 4
ownpal = 1

[State 197, 2]
type = Explod
trigger1 = Time = 3
anim = 198
ID = 197
pos = -21,11
postype = p1
facing = 1
vfacing = -1
bindtime = 1
vel = -4.5,3.8
removetime = -2
scale = 1,1
sprpriority = 4
ownpal = 1

[State 197, 3]
type = Explod
trigger1 = Time = 3
anim = 198
ID = 197
pos = 21,-11
postype = p1
facing = -1
vfacing = 1
bindtime = 1
vel = 4.5,-3.8
removetime = -2
scale = 1,1
sprpriority = 4
ownpal = 1

[State 197, 4]
type = Explod
trigger1 = Time = 3
anim = 198
ID = 197
pos = 21,11
postype = p1
facing = -1
vfacing = -1
bindtime = 1
vel = 4.5,3.8
removetime = -2
scale = 1,1
sprpriority = 4
ownpal = 1

[State 197, 5]
type = PosAdd
trigger1 = !Time
y = -35

[State 197, 6]
type = PlaySnd
trigger1 = AnimElem = 1
value = S190,1

[State 197, 7]
type = DestroySelf
trigger1 = Time = 4
;========================<EXPLODSIVE BUFFERING HELPER>=============================
[StateDef 90000005]
type = A
physics = N
moveType = I
anim = 1
velSet = 0,0
ctrl = 0
     
[State 90000005, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "by JustMorphPointman"
ignoreHitPause = 1
;---------------------------------------------------------------------------
; Override common states (use same number to override) :
;---------------------------------------------------------------------------
;---------------------------------------------------------------------------
; Jump Up
[Statedef 50]
type    = A
physics = A

[State 50, 1]
type = VarSet
trigger1 = Time = 0
sysvar(1) = 0

[State 50, 2]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 50, 3]
type = VelSet
triggerall = !Vel X && Time
trigger1 = Command = "FF"
x = Const(velocity.runjump.fwd.x)

[State 50, 4]
type = VelSet
triggerall = !Vel X && Time
trigger1 = Command = "BB"
x = Const(velocity.runjump.back.x)

[State 50, 5]
type = PlaySnd
trigger1 = !Time 
value = S40,0

;---------------------------------------------------------------------------
; HIT_LIEDEAD
[Statedef 5150]
type    = L
movetype= H
physics = N
sprpriority = -3

[State 5150, 6] ;Friction
type = VelMul
trigger1 = 1
x = 0.85

[State 5150, 7] ;Friction
type = VelSet
trigger1 = Vel x < .05
persistent = 0
x = 0

[State 5150, 8]
type = NotHitBy
trigger1 = 1
value = SCA
time = 1

[State 5150, 9]
type = AssertSpecial
trigger1 = PrevStateNo = 5400
flag = noshadow

[State 5150, 10]
type = VelSet
trigger1 =  PrevStateNo = 5400
x = 0
y = 0

[State 5150, 11]
type = ChangeAnim
triggerall = PrevStateNo = 5601
trigger1 = Time = 0
value = 5601
elem = 2
;---------------------------------------------------------------------------
;HIT_DEFEATED
[Statedef 5600]
type    = A
movetype= H
physics = N
sprpriority = -3
velset = -2,-4.5
anim = 5600
ctrl = 0

[State 5600, 1]
type = Gravity
trigger1 = 1

[State 5600, 2]
type = AssertSpecial
trigger1 = 1
flag = nomusic
flag2 = noshadow

[State 5600, 3]
type = PlaySnd
trigger1 = !Time
value = S181, 0

[State 5600, 4]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 5601
;---------------------------------------------------------------------------
;HIT_DEFEATED
[Statedef 5601]
type    = L
movetype= H
physics = N
sprpriority = -3
velset = 0,0
anim = 5601
ctrl = 0

[State 5601, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 5601, 2]
type = PlaySnd
trigger1 = !Time
value = S11,1

[State 5400, 3]
type = AssertSpecial
trigger1 = 1
flag = nokoslow
flag2 = nomusic
flag3 = noshadow 

[State 5601, 4]
type = ChangeState
trigger1 = Time = 145
value = 5150

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------

;---------------------------------------------------------------------------
; States that are executed when in self's state file (use statedef -3)
;---------------------------------------------------------------------------


